home *** CD-ROM | disk | FTP | other *** search
/ I.C.E. International Computer Entertainment 5 / I.C.E. - International Computer Entertainment - Issue 05 (1991-08)(Cytax).adf / SOURCES / zoom.S.pp / zoom.S
Encoding:
Text File  |  1991-01-01  |  13.7 KB  |  772 lines

  1. ************************************************************************
  2. * 4-Bitplane-Zoom-Routine     C) May 1991 by the WEAPONMASTER/CYTAX    *
  3. * Release in I.C.E. Issue #5                                           *
  4. ************************************************************************
  5. * I programmed this routine after I saw Sanity's 'Elysium'-demo.       *
  6. * It wasn't my original intention to publish this sourcecode, so I     *
  7. * didn't comment the routines in the way as I would do, if the source- *
  8. * code should be released. For this reason nearly all comments are in  *
  9. * German, but I decided to publish it, because a lot of coders wanted  *
  10. * a copy from me.  The important routines are partially optimised, but *
  11. * not the routines for display-, start-initialization and main-loop.   *
  12. * I didn't want to waste much time, so I used parts of my older        *
  13. * productions for controlling the important routines.                  *
  14. ************************************************************************
  15.  
  16. * If you want to contact me for any reason write to the I.C.E. address
  17. * but mark your sending, that the other Cytax-members will notice
  18. * that they should give it to me.
  19. * (e.g. add something like: 'to Weaponmaster' or 'to WPM.')
  20.  
  21. * For 'zooming' press left Mouse-Button, right MB for exit
  22. * The sourcecode works with 'Seka V3.2'
  23.  
  24. >extern "testpic",origpic,32032    ;Bild muß folgendes Format haben
  25.                 ;4 Bitplanes (320*200), 8000 Bytes groß
  26.                 ;+ 16 Farben (dahinter)
  27.  
  28. ;Makrodefinition zum Warten auf Blitter
  29. waitblit: macro
  30. wblit?0:
  31.  btst #14,(A5)
  32.  bne.s wblit?0
  33. endm
  34.  
  35. start:
  36. move.l 4.w,a6
  37. jsr -132(a6)            ;Forbid (eigentlich nicht notwendig,
  38.                 ;da IRQs später aus)
  39. lea grname,a1
  40. clr.l d0
  41. jsr -552(a6)
  42. move.l d0,graphicsbase
  43. beq error
  44.  
  45. lea $dff002,a5
  46. move.w $1a(a5),intenaold
  47. move.w #$7fff,$98(a5)        ;IRQs aus
  48.  
  49. move.w #$03f0,$94(a5)
  50. move.w #$2c81,$8c(a5)
  51. move.w #$f5c1,$8e(a5)
  52. move.w #$38,$90(a5)
  53. move.w #$d0,$92(a5)
  54. move   #$4200,$fe(a5)
  55. move.w #0,$100(a5)
  56.  
  57. move.w #$2c07,d0
  58. move.w #$fffe,d1
  59. move.l #$01080078,d2
  60. move.l #$010a0078,d3
  61. move.w #$100,d4
  62. move.w #$f507,d5
  63. lea cpl_mod-6,a0
  64.  
  65. cop_init1:
  66. move.w d0,(a0)+
  67. move.w d1,(a0)+
  68. move.l d2,(a0)+
  69. move.l d3,(a0)+
  70. add.w  d4,d0
  71. cmp.w d5,d0
  72. blo.s cop_init1
  73.  
  74. lea col1,a0
  75. lea $17e(a5),a1
  76. move.w #$f,d0
  77. cop_init2:
  78. move.w (a0)+,(a1)+
  79. dbf d0,cop_init2
  80.  
  81. move.l #cladr,$7e(a5)
  82. move.w #0,$86(a5)
  83.  
  84. move.l #planes1,planeakt
  85. move.l #planes2,planeverd
  86. clr.w bildnr
  87.  
  88. move.l planeakt,d0
  89. move.w d0,cladr+2
  90. swap d0
  91. move.w d0,cladr+6
  92. swap d0
  93. add.l #40,d0
  94. move.w d0,cladr+10
  95. swap d0
  96. move.w d0,cladr+14
  97. swap d0
  98. add.l #40,d0
  99. move.w d0,cladr+18
  100. swap d0
  101. move.w d0,cladr+22
  102. swap d0
  103. add.l #40,d0
  104. move.w d0,cladr+26
  105. swap d0
  106. move.w d0,cladr+30
  107.  
  108. move.w #$87c0,$94(a5)
  109.  
  110. jsr tabinit
  111. jsr hauptprogramm
  112.  
  113. move.w #$03f0,$94(a5)
  114.  
  115. move.w intenaold,d0
  116. bset #15,d0
  117. move.w d0,$98(a5)
  118. move.l graphicsbase,a1
  119. move.l 38(a1),$7e(a5)
  120. move.w #0,$86(a5)
  121. jsr -414(a6)
  122. move.w #$83f0,$94(a5)
  123. error:
  124. jsr -138(a6)
  125. clr.l d0
  126. rts
  127.  
  128. intenaold: dc.w 0
  129.  
  130. hauptprogramm:
  131. clr.w bildnr
  132.  
  133. ranzoomen:
  134. btst #10,$14(a5)
  135. beq ende
  136. btst #6,$bfe001
  137. bne.s ranzoomen
  138.  
  139. move.w bildnr,d0
  140. move.l planeakt,a0
  141. lea 160(a0),a0
  142. move.l planeverd,a1
  143. lea 160(a1),a1
  144. lea origpic,a4
  145. bsr vergroessern
  146. bsr umschalten
  147. addq.w #1,bildnr
  148. cmpi.w #160,bildnr
  149. blt.s ranzoomen
  150.  
  151. subq.w #1,bildnr
  152.  
  153. move.l #$30000,d0
  154. verz:
  155. subq.l #1,d0
  156. bne.s verz
  157.  
  158. wegzoomen:
  159. btst #10,$14(a5)
  160. beq ende
  161. btst #6,$bfe001
  162. bne.s wegzoomen
  163.  
  164. move.w bildnr,d0
  165. move.l planeakt,a0
  166. lea 160(a0),a0
  167. move.l planeverd,a1
  168. lea 160(a1),a1
  169. bsr verkleinern
  170. bsr umschalten
  171. subq.w #1,bildnr
  172. bpl.s wegzoomen
  173. bra hauptprogramm
  174.  
  175. ende:
  176. rts
  177.  
  178. bildnr: dc.w 0
  179.  
  180. ****************************************************************************
  181.  
  182. umschalten:
  183. move.l planeakt,d0
  184. move.l planeverd,d1
  185. exg d0,d1
  186. move.l d0,planeakt
  187. move.l d1,planeverd
  188.  
  189. waitrast:
  190. move.w 4(a5),d1
  191. and.w #$ff00,d1
  192. cmp.w #$f600,d1
  193. blo.s waitrast
  194.  
  195. move.w d0,cladr+2
  196. swap d0
  197. move.w d0,cladr+6
  198. swap d0
  199. add.l #40,d0
  200. move.w d0,cladr+10
  201. swap d0
  202. move.w d0,cladr+14
  203. swap d0
  204. add.l #40,d0
  205. move.w d0,cladr+18
  206. swap d0
  207. move.w d0,cladr+22
  208. swap d0
  209. add.l #40,d0
  210. move.w d0,cladr+26
  211. swap d0
  212. move.w d0,cladr+30
  213.  
  214. move.l #cpl_mod,d0
  215. waitblit
  216. move.l d0,$52(a5)        ;DPT
  217. move.w #-40,$72(a5)        ;ADAT
  218. move.w #10,$64(a5)        ;DMOD
  219. move.l #$ffffffff,$42(a5)    ;Masken
  220. move.l #$01f00000,$3E(a5)    ;CON0
  221. move.w #$3241,$56(a5)        ;SIZE
  222.  
  223. move.w bildnr,d1
  224. add.w d1,d1
  225. add.w d1,d1
  226. lea ModTabZeiger,a0
  227. move.l (a0,d1.w),a0
  228.  
  229. move.w (a0)+,d1            ;Offset
  230. move.w (a0)+,d2            ;Anzahl = Blt-Height
  231. beq.s um_next
  232.  
  233. lsl.w #6,d2
  234. addq.w #1,d2            ;Bltsize
  235.  
  236. ext.l d1
  237. add.l d0,d1            ;Startadresse.
  238.  
  239. waitblit
  240. move.l a0,$4e(a5)        ;APT
  241. move.l d1,$52(a5)        ;DPT
  242. move.w #$09f0,$3e(a5)        ;CON0
  243. move.w #0,$62(a5)        ;AMOD
  244. move.w d2,$56(a5)        ;Size
  245.  
  246. um_next:
  247. waitblit
  248.  
  249. move.l d0,$4e(a5)        ;APT
  250. addq.l #4,d0
  251. move.l d0,$52(a5)        ;DPT
  252. move.w #10,$62(a5)        ;AMOD
  253. move.w #$09f0,$3E(a5)        ;CON
  254. move.w #$3241,$56(a5)        ;SIZE
  255.  
  256. waitblit
  257. rts
  258.  
  259. **********************************************************************
  260. * Startinitialisierungen der Zoom-Routine                            *
  261. **********************************************************************
  262.  
  263. TabInit:
  264. lea ZeilenTab(PC),a0
  265. lea BitTab(PC),a1
  266.  
  267. moveq #15,d0
  268.  
  269.  ti_loop1:
  270.  lea WortTab(PC),a2
  271.  move.w (a1)+,d1
  272.  move.w #9,d2
  273.  
  274.   ti_loop2:
  275.   move.w (a2)+,d3
  276.   asl.w #4,d3
  277.   add.w d1,d3
  278.   move.w d3,(a0)+
  279.   dbf d2,ti_loop2
  280.  
  281.  dbf d0,ti_loop1
  282.  
  283. lea ArbeitsTab(pc),a0
  284. move.w #159,d0
  285. move.w #2000,d1
  286.  ti_loop3:
  287.  move.w d1,(a0)+
  288.  dbf d0,ti_loop3
  289.  
  290. lea ZeilenTab(pc),a0
  291. lea Einftab(pc),a1
  292. lea ArbeitsTab(pc),a2
  293. clr.w d0
  294.  
  295.  ti_loop4:
  296.  move.w (a0,d0.w),d1
  297.  moveq #-2,d2
  298.  
  299.   ti_loop5:
  300.   addq.w #2,d2
  301.   cmp.w (a2,d2.w),d1
  302.   bgt.s ti_loop5
  303.  
  304.  lea 318(a2),a3
  305.  lea (a2,d2.w),a4
  306.  
  307.   ti_loop6:
  308.   move.w -(a3),2(a3)
  309.   cmpa.l a4,a3
  310.   bhi.s ti_loop6
  311.  
  312.  move.w d1,(a4)
  313.  
  314.  lsr.w #1,d2
  315.  move.w d2,(a1)+
  316.  addq.w #2,d0
  317.  cmp.w #160*2,d0
  318.  blo.s ti_loop4
  319.  
  320. lea VielfachenTab,a2
  321. clr.w (a2)+
  322.  
  323. move.w #120,d0
  324. move.w #160,d1
  325. move.w #200,d2
  326.  
  327. ti_loop10:
  328. move.w d0,(a2)+
  329. add.w d1,d0
  330. dbf d2,ti_loop10
  331.  
  332. ;Modulotabelle aufbauen
  333.  
  334. lea modulotab,a0
  335. lea ModTabZeiger,a1
  336. lea Vielfachentab,a2
  337. moveq #1,d7            ;n = Breite /2
  338.  
  339. move.l a0,(a1)+            ;Offset auf Daten in ModTab für
  340. move.l #0,(a0)+            ;Bildnr. 0 (nichts sichtbar)
  341.  
  342.  
  343. ti_loop9:
  344. move.l a0,(a1)+            ;Offset auf Daten in ModTab für
  345.                 ;jeweilige Bildnr.
  346. moveq #0,d6            ;Register für Coplistoffsets
  347.  
  348. move.w d7,d0            ;n
  349. move.w d7,d2
  350. mulu #$a000,d0
  351. move.l #$640000,d1
  352. sub.l d0,d1
  353. swap d1                ;= erste Zeile, in der Modulos
  354.                 ;aus Tab geschrieben werden
  355. add.w d1,d1
  356. add.w d1,d1            ;4*
  357. add.w d1,d6            ;+
  358. add.w d1,d1            ;8*
  359. add.w d1,d6            ;=12* (da Move Mod1; Mod2; Wait =
  360.                 ;(3 CopperBefehle)
  361. add.l d0,d0
  362. swap d0                ;= 2n* 200/320 = Höhe
  363.  
  364. move.l #$a000,d1
  365. divu d2,d1
  366. swap d1
  367. clr.w d1
  368. lsr.l #8,d1            ;$a000/n * $100  als $10000er-Bruch
  369.  
  370. moveq #0,d2
  371. moveq #0,d4
  372.  
  373. ;in d0: Anzahl (eigentlich Anzahl-1 wegen Zeile 0) -> Schleifenvar.
  374. ;in d1: Zähler zum Aufaddieren
  375. ;d2: Aufaddierungsregister
  376. ;d3:
  377. ;d4: Jeweils letzte Zeile
  378. ;d6: Coplistoffset
  379. ;a0: ModTab
  380. ;a1: ModZeiger
  381. ;a2: VielfachenTab
  382.  
  383. move.w d6,(a0)+            ;Coplistoffset schreiben
  384. move.w d0,(a0)+            ;Anzahl-1 schreiben
  385. addq.w #1,-2(a0)        ;+1 = Anzahl (Bltsize-Höhe)
  386.  
  387. bra.s ti_loop7
  388.  
  389. ti_loop8:
  390. add.l d1,d2            ;Zähler aufaddieren
  391. swap d2                ;= i-te Zeile
  392. move.w d2,d3            ;darzustellende OrigZeile
  393.  
  394. sub.w d4,d3            ;- letzte OrigZeile = Zeilendifferenz
  395. add.w d3,d3            ;*2 = VielfachenOffset
  396.  
  397. ;move.w  d3,(a0)+
  398. move.w (a2,d3.w),(a0)+        ;Mod aus VfTab nach ModTab schreiben
  399. move.w d2,d4
  400. swap d2
  401. ti_loop7:
  402. dbf d0, ti_loop8
  403.  
  404. move.w #201,d3            ;Von letzter Zeile (d4) auf OrgZeile 201
  405. sub.w d4,d3            ;Zeilendifferenz
  406. add.w d3,d3
  407. move.w (a2,d3.w),(a0)+
  408. ;move.w  d3,(a0)+
  409. addq.w #1,d7
  410. cmp.w #160,d7
  411. bls.s ti_loop9
  412. rts
  413.  
  414. ****************************************************************************
  415. verkleinern:
  416. ****************************************************************************
  417.  
  418. ;A0 Quellpuffer
  419. ;A1 Zielpuffer
  420. ;Bildnr. in d0
  421.  
  422. ;lea $dff002,a5
  423.  
  424. add.w d0,d0
  425. lea EinfTab(pc),a2
  426. move.w #$9f,d6
  427. sub.w (a2,d0.w),d6
  428.  
  429. move.l a0,a2            ;Pufferadr. kopieren
  430. move.l a1,a3
  431.  
  432. move.w d6,d7
  433. not.w d7
  434. and.w #$f,d7            ;Bitnr. links in   d7
  435. lsr.w #4,d6            ;Breite-1 in W. in d6
  436. move.w d6,d5
  437. add.w d5,d5            ;Breite-2 in B. in d5
  438.  
  439. *** LINKER TEIL
  440.  
  441. moveq #38,d0
  442. sub.w d5,d0
  443. move.w d6,d1
  444. add.w #$c801,d1
  445.  
  446. waitblit
  447. move.l #$fffffffe,$42(a5)    ;FWM,LWM
  448. movem.l a0/A1,$4E(a5)        ;APT,DPT
  449. move.w d0,$62(a5)        ;AMOD
  450. move.w d0,$64(a5)        ;DMOD
  451. move.l #$19f00000,$3e(a5)    ;CON0,CON1
  452. move.w d1,$56(a5)        ;SIZE
  453.  
  454. *** LINKER TEIL RECHTES WORT
  455.  
  456. adda.w d5,a0
  457. adda.w d5,a1
  458. clr.w d4
  459. bset d7,d4
  460. subq.w #1,d4
  461. ;beq nächste Blitteroperation
  462. moveq #38,d2
  463. waitblit
  464. movem.l a0/a1,$4E(a5)        ;APT,DPT
  465. move.l a1,$4a(a5)        ;BPT
  466. move.w d2,$60(a5)        ;BMOD
  467. move.w d2,$62(a5)        ;AMOD
  468. move.w d2,$64(a5)        ;DMOD
  469. move.w #$ffff,$44(a5)        ;LWM
  470. move.w d4,$6e(a5)        ;CDAT
  471. move.w #$0de4,$3e(a5)        ;CON0
  472. move.w #$c801,$56(a5)        ;SIZE
  473.  
  474. *** MITTE
  475.  
  476. moveq #18,d2
  477. sub.w d5,d2            ;Breite Mitte in W.
  478. beq.s vk_nextBlit        ;falls 0, nächste Operation
  479. moveq #40,d3
  480. sub.w d2,d3
  481. sub.w d2,d3
  482. add.w #$c800,d2
  483. addq.w #2,a0
  484. addq.w #2,a1
  485.  
  486. waitblit
  487. movem.l a0/a1,$4e(a5)        ;APT,DPT
  488. move.w d3,$62(a5)        ;AMOD
  489. move.w d3,$64(a5)        ;DMOD
  490. move.w #$09f0,$3e(a5)        ;CON0
  491. move.w d2,$56(a5)        ;SIZE
  492.  
  493. *** RECHTER TEIL
  494.  
  495. vk_nextblit:
  496. lea $7d00-2(a2),a2
  497. lea $7d00-2(a3),a3
  498. waitblit
  499. movem.l a2/a3,$4E(a5)        ;APT,DPT
  500. move.w #$7fff,$44(a5)        ;LWM
  501. move.w d0,$62(a5)        ;AMOD
  502. move.w d0,$64(a5)        ;DMOD
  503. move.l #$19f00002,$3e(a5)    ;CON0,CON1
  504. move.w d1,$56(a5)        ;SIZE
  505.  
  506. *** RECHTER TEIL LINKES WORT
  507.  
  508. eori.w #$f,d7
  509. addq.w #1,d7
  510. clr.w d4
  511. bset d7,d4
  512. ;subq.w #1,d7
  513. subq.w #1,d4
  514. not.w d4
  515. ;beq Ende (==> RTS)
  516.  
  517. moveq #38,d2
  518. suba.w d5,a2
  519. suba.w d5,a3
  520.  
  521. waitblit
  522. movem.l a2/a3,$4E(a5)        ;APT,DPT
  523. move.l a3,$4a(a5)        ;BPT
  524. move.w d2,$60(a5)        ;BMOD
  525. move.w d2,$62(a5)        ;AMOD
  526. move.w d2,$64(a5)        ;DMOD
  527. move.w #$ffff,$44(a5)        ;LWM
  528. move.w d4,$6e(a5)        ;CDAT
  529. move.w #$0DE4,$3e(a5)        ;CON0
  530. move.w #$c801,$56(a5)        ;SIZE
  531. rts
  532.  
  533. ****************************************************************************
  534. vergroessern:
  535. ****************************************************************************
  536.  
  537. ;A0 Quellpuffer
  538. ;A1 Zielpuffer
  539. ;Bildnr. in d0
  540. ;A4 Zeiger auf OriginalBild
  541.  
  542. lea $dff002,a5
  543.  
  544. lea einftab(pc),a2
  545. add.w d0,d0
  546. move.w d0,-(a7)                 ;Tabellenoffset auf Stack retten
  547. move.w #$9f,d6
  548. sub.w (a2,d0.w),d6
  549.  
  550. move.l a0,a2            ;Pufferadr. kopieren
  551. move.l a1,a3
  552.  
  553. move.w d6,d7
  554. and.w #$f,d7            ;Bitpos rechts in d7
  555. lsr.w #4,d6            ;Breite-1 in W. d6
  556. move.w d6,d5
  557. add.w d5,d5            ;Breite-2 in B. in d5
  558.  
  559. *** RECHTER TEIL
  560.  
  561. lea 38(a0),a0
  562. lea 38(a1),a1
  563. suba.w d5,a0            ;Startadr.
  564. suba.w d5,a1
  565.  
  566. moveq #38,d0
  567. sub.w d5,d0            ;Modulo
  568. move.w d6,d1
  569. add.w #$c801,d1            ;Size
  570.  
  571. waitblit
  572. move.l #$ffffffff,$42(a5)       ;FWM,LWM
  573. movem.l a0/a1,$4e(a5)        ;APT,DPT
  574. move.w d0,$62(a5)               ;AMOD
  575. move.w d0,$64(a5)        ;DMOD
  576. move.l #$19f00000,$3e(a5)       ;CON0,CON1
  577. move.w d1,$56(a5)        ;SIZE
  578.  
  579. *** RECHTER TEIL LINKES WORT
  580.  
  581. lea $7d00-4(a2),a0
  582. lea $7d00-2(a3),a1        ;Startadr.
  583. suba.w d5,a0
  584. suba.w d5,a1
  585.  
  586. clr.w d4
  587. addq.w #1,d7
  588. bset d7,d4
  589. subq.w #1,d7
  590. subq.w #1,d4            ;Maske
  591. not.w d4
  592. ;beq next_Blit_OP
  593.  
  594. moveq #38,d2            ;Modulo
  595.  
  596. waitblit
  597.  
  598. move.l a1,$4a(a5)        ;BPT
  599. move.l a1,$4e(a5)        ;APT
  600. move.l a1,$52(a5)        ;DPT
  601. move.w d2,$60(a5)        ;BMOD
  602. move.w d2,$62(a5)        ;AMOD
  603. move.w d2,$64(a5)        ;DMOD
  604. move.w d4,$6e(a5)        ;CDAT
  605. move.l #$1de40002,$3e(a5)       ;CON0,CON1
  606. move.w #$c801,$56(a5)        ;SIZE
  607.  
  608. ;next_Blit_O:P
  609. subq.w #2,a1
  610.  
  611. *** MITTE
  612.  
  613. moveq #18,d2
  614. sub.w d5,d2                     ;Breite Mitte in W.
  615. beq.s vgr_nextblit        ;falls 0, nächste Operation
  616. moveq #40,d3
  617. sub.w d2,d3
  618. sub.w d2,d3            ;Modulo
  619.  
  620. waitblit
  621.  
  622. movem.l a0/a1,$4e(a5)        ;APT,DPT
  623. move.w d3,$62(a5)        ;AMOD
  624. move.w d3,$64(a5)               ;DMOD
  625. move.w d2,d3
  626. add.w #$c800,d2
  627. move.w #$09f0,$3e(a5)        ;CON0
  628. move.w d2,$56(a5)        ;SIZE
  629.  
  630. add.w d3,d3
  631. suba.w d3,a0
  632. suba.w d3,a1
  633.  
  634. *** LINKER TEIL
  635.  
  636. vgr_nextblit:
  637.  
  638. waitblit
  639.  
  640. movem.l a0/a1,$4e(a5)        ;APT,DPT
  641. move.w d0,$62(a5)        ;AMOD
  642. move.w d0,$64(a5)        ;DMOD
  643. move.w #$19f0,$3e(a5)        ;CON0
  644. move.w d1,$56(a5)        ;SIZE
  645.  
  646. *** LINKER TEIL RECHTES WORT
  647.  
  648. lea (a3,d5.w),a1
  649. moveq #38,d2
  650. clr.w d4
  651. eori.w #$f,d7
  652. bset d7,d4
  653. subq.w #1,d4
  654. ;beq nextOp
  655.  
  656. waitblit
  657. move.l a1,$4a(a5)        ;BPT
  658. move.l a1,$4e(a5)        ;APT
  659. move.l a1,$52(a5)        ;DPT
  660. move.w d2,$60(a5)        ;BMOD
  661. move.w d2,$62(a5)        ;AMOD
  662. move.w d2,$64(a5)        ;DMOD
  663. move.w d4,$6e(a5)        ;CDAT
  664. move.l #$1de40000,$3e(a5)    ;CON0,CON1
  665. move.w #$c801,$56(a5)        ;SIZE
  666.  
  667. ;Daten, die jetzt noch benötigt werden:
  668. ;d5 (Breite-2) in Bytes
  669. ;a3 Zielpuffer
  670. ;a4 Zeiger auf OriginalBild
  671. ;d7 Bitnummer Einfügstelle links
  672.  
  673. move.w (a7)+,d0            ;Bildnr.
  674.  
  675. *** Zeile links einfügen
  676.  
  677. lea ZeilenTab(pc),a2
  678. move.w (a2,d0.w),d6        ;Origzeile Zeilentab
  679. move.w #$9f,d1
  680. sub.w d6,d1            ;Origzeile $9f-Zeilentab
  681. move.w d1,d2
  682. not.w d2
  683. and.w #$f,d2            ;Bitpos Origzeile links
  684. lsr.w #4,d1
  685. add.w d1,d1                     ;Offset in OrigBild in Bytes
  686.  
  687. lea (a4,d1.w),a0        ;Quelle OrigBild
  688. lea (a3,d5.w),a1        ;Ziel A/D
  689. bsr einfuegen
  690.  
  691. *** Zeile rechts einfügen
  692.  
  693. neg.w d1
  694. lea 38(a4,d1.w),a0
  695. neg.w d5
  696. lea 38(a3,d5.w),a1
  697. eor #$f,d7
  698. eor #$f,d2
  699. bsr einfuegen
  700. rts
  701.  
  702. einfuegen:
  703. clr.w   d4
  704. bset d7,d4
  705.  
  706. move.w d2,d3
  707. sub.w d7,d3
  708. bmi ef_desc
  709.  
  710. ;ascending
  711.  
  712. ror.w #4,d3            ;Barrelshifter-Bits positionieren
  713. or.w  #$0de4,d3
  714.  
  715. waitblit
  716.  
  717. movem.l a0/a1,$4e(a5)        ;APT,DPT
  718. move.l  a1,$4a(a5)        ;BPT
  719. move.w  d3,$3e(a5)        ;CON0
  720. move.w  #0,$40(a5)        ;CON1
  721. move.w  d4,$6e(a5)              ;CDAT
  722. move.w  #$c801,$56(a5)        ;SIZE
  723. rts
  724.  
  725. ef_desc:
  726. neg.w d3
  727. ror.w #4,d3
  728. or.w #$0de4,d3
  729.  
  730. lea 799*40(a0),a0
  731. lea 799*40(a1),a1
  732.  
  733. waitblit
  734.  
  735. movem.l a0/a1,$4e(a5)        ;APT,DPT
  736. move.l  a1,$4a(a5)        ;BPT
  737. move.w d3,$3e(a5)        ;CON0
  738. move.w #2,$40(a5)        ;CON1
  739. move.w d4,$6e(a5)        ;CDAT
  740. move.w #$c801,$56(a5)        ;SIZE
  741. rts
  742.  
  743. ZeilenTab:    blk.w 160,0
  744. EinfTab:     blk.w 160,0
  745. ArbeitsTab:    blk.w 160,0
  746.  
  747. WortTab: dc.w 0,5,7,3,9,1,6,4,8,2
  748. BitTab: dc.w 8,12,4,14,2,10,6,15,0,3,13,5,11,9,7,1
  749.  
  750. grname: dc.b "graphics.library",0,0
  751. graphicsbase: dc.l 0
  752.  
  753. cladr:
  754. dc.w $e2,0,$e0,0, $e6,0,$e4,0, $ea,0, $e8,0, $ee,0, $ec,0
  755. dc.w 0,0,0
  756. cpl_mod:
  757. blk.b 6,0
  758. blk.b 200*12
  759. dc.w $ffff,$fffe
  760.  
  761. planeAkt:  dc.l planes1
  762. planeVerd: dc.l planes2
  763.  
  764. VielfachenTab: blk.w 202,0
  765. ModTabZeiger:  blk.l 161,0
  766. ModuloTab:     blk.b 33044     ;Format dc.w Coplistoffset,Anzahl,
  767.                                ;            Wert1, Wert2, ...
  768. planes1:  blk.b 32320,0
  769. planes2:  blk.b 32320,0
  770. origpic:  blk.b 32000,0
  771. col1: blk.w 16,0
  772.